package com.learning.platform.enums;

public enum ErrorCode {
    SUCCESS(0, "success"),
    PARAM_ERROR(1001, "参数错误"),
    USER_NOT_LOGIN(1002, "用户未登录"),
    PERMISSION_DENIED(1003, "权限不足"),
    USER_NOT_FOUND(1004, "用户不存在"),
    PASSWORD_ERROR(1005, "密码错误"),
    USERNAME_EXISTS(1006, "用户名已存在"),
    EMAIL_EXISTS(1007, "邮箱已存在"),
    COURSE_NOT_FOUND(2001, "课程不存在"),
    LESSON_NOT_FOUND(2002, "章节不存在"),
    UPLOAD_ERROR(3001, "文件上传失败"),
    AI_SERVICE_ERROR(3002, "AI服务异常"),
    SYSTEM_ERROR(9999, "系统内部错误");
    
    private final int code;
    private final String message;
    
    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }
    
    public int getCode() {
        return code;
    }
    
    public String getMessage() {
        return message;
    }
}










